<?php 
	class Control extends SmartyView{
		protected $varNum=array();
		public function __call($name,$arguments){
			echo "<script>location.href='./index.php'</script>";
		}
//		protected function display($var=null){
//			extract($this->varNum);
//			if(empty($var)){
//				require APP_TPL_PATH.'/'.CONTROL.'/'.METHOD.'.html';
//			}else{
//				$type = ltrim(strrchr($var,'.'),'.');
//				if(!empty($type)){
//					$path = $var;
//				}else{
//					$path = $var.'.html';
//				}
//				require APP_TPL_PATH.'/'.CONTROL.'/'.$path;
//			}
//		}
		protected function success($msg,$url){
			header('Content-type:text/html;charset=utf-8');
			echo "<script>alert('$msg');location.href='$url'</script>";
		die;
		}

		protected function error($msg){
			header('Content-type:text/html;charset=utf-8');
			echo "<script>alert('$msg');window.history.back()</script>";
			die;
		}
//		protected function assign($var,$value){
//			$this->varNum[$var] = $value;
//		}
//		public function __set($var,$value){
//			$this->varNum[$var] = $value;
//		}
	}
 ?>